import {get,postJSON,upload} from "@/utils/http/createHttp.js"

const apiAdvertisement  = {
    // 获取所有广告
    getAllArticle:()=>{
        return get("/api/user/getAllAd")
    },
    // 添加广告
    addArticle:(data)=>{
        return postJSON("/advertisement/add",data)
    },
    // 上传文件
    UploadFile:(data)=>{
        return upload("/upload/file",data)
    },
    // 更新 
    UpdateArticle:(data)=>{
        return postJSON("/advertisement/update",data)
    },
    // 删除
    deleteArticle:(data)=>{
        return postJSON("/advertisement/delete",data)
    }
}

export default apiAdvertisement